<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">
    <title>商家后台</title>
    <link href="../pages/layui/css/layui.css" rel="stylesheet">
    <script src="../pages/layui/layui.js"></script>
</head>

<body class="layui-layout-body">

<!-- 顶部区域 -->
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">商家后台</div>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <p id="store_name">

                </p>

            </li>
            <li class="layui-nav-item">
                <!--TODO -->
                <!--可能需要修改路径-->
                <a href="../login/business">退出</a>
            </li>
        </ul>
    </div>


    <!-- 左侧导航栏 -->
    <div class="layui-tab  layui-side layui-tab-card site-demo-button">
        <ul class="layui-nav layui-side layui-nav-tree layui-nav-side">

            <li class="layui-nav-item layui-nav-itemed">

                <a href="javascript:" onclick="list('BusinessMassage')">商家信息</a>

            </li>
            <li class="layui-nav-item layui-nav-itemed">
                <a href="javascript:;" onclick="list('OrderCenter')">接单中心</a>

            </li>

            <li class="layui-nav-item layui-nav-itemed">
                <!--                    <a href="javascript:;" onclick="list('BusinessBanner')">轮播管理</a>-->

            </li>

            <li class="layui-nav-item layui-nav-itemed">
                <a href="javascript:;" onclick="list('Classify')">分类管理</a>

            </li>
            <li class="layui-nav-item layui-nav-itemed">
                <a href="javascript:;" onclick="list('Menu')">菜品管理</a>

            </li>
        </ul>


    </div>

    <!-- 右侧区域 -->
    <div class="layui-body">
        <!-- 内容主体区域 -->
        <div class="layui-tab" lay-allowClose="true" lay-filter="demo">
            <!--tab页标题-->
            <ul class="layui-tab-title">
            </ul>

            <!--tab页标题上右键，出现下面的 关闭当前和关闭所有的选项-->
            <ul class="rightMenu" style="display: none;position: absolute;">
                <li class="layui-bg-cyan" data-type="closeThis">关闭当前</li>

                <li class="layui-bg-cyan" data-type="closeAll">关闭所有</li>
            </ul>

            <!--tab页主体内容区域-->


        </div>
        <iframe id="list" src="../pages/BusinessMassage.html" style="border: 0;width: 99% ;height: 100%;"></iframe>
    </div>


    <div class="layui-footer">
        <!-- 底部固定区域 -->
        © OrderProject - 商家后台
    </div>

</div>


<script>
    function list(msg) {
        document.getElementById("list").src = "../pages/" + msg + ".html";
    }

    // layui引入需要的组件
    let $ = layui.jquery;
    let layer = layui.layer;
    let form = layui.form;
    $.ajax({
        url: '../business/findBusiness',
        dataType: 'json',
        type: 'post',
        success: function (data) {
            document.getElementById("store_name").innerText = data.storeName;
        }
    });

</script>


</body>

</html>